package com.bolt.support.json.fastjson;

import com.alibaba.fastjson.parser.ParserConfig;
import com.bolt.convention.data.PageInfo;
import com.bolt.convention.data.ResultMessage;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * Created by Administrator on 2019/9/10.
 */
public class ConventionCodec {

    public static void registry() {
        ParserConfig.getGlobalInstance().putDeserializer(ResultMessage.class, ResultMessageDeserializer.instance);
        ParserConfig.getGlobalInstance().putDeserializer(PageInfo.class, PageDeserializer.instance);
        ParserConfig.getGlobalInstance().putDeserializer(LocalDate.class, LocalDateDeserializer.instance);
        ParserConfig.getGlobalInstance().putDeserializer(LocalDateTime.class, LocalDateDeserializer.instance);
    }
}

 